blob: 1fc23abd59dfeb94189c7f4308e4fe6012e495a8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
<script context="module" lang="ts">
import type { SanityBlockArray } from "$lib/sanity/types/block-array";
export type DescriptionModel = {
title: string;
content?: SanityBlockArray;
};
</script>
<script lang="ts">
import { PortableText } from "@portabletext/svelte";
export let model: DescriptionModel;
let visible = true;
$: if (!model.title) {
visible = false;
} else {
visible = true;
}
</script>
{#if visible}
<h3 class="mb-3">{model.title}</h3>
{#if model.content}
<PortableText value={model.content} />
{/if}
{/if}
|